package com.tensquare.qa.client;

import com.tensquare.qa.client.impl.LabelClientImpl;
import entity.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * Created by WF on 2020/10/27 10:00
 * 熔断器的方案一：
 */

@FeignClient(value="tensquare-base",fallback = LabelClientImpl.class)      //value:定义微服务的名称 fallback:定义熔断的实现
public interface LabelClient {

    @GetMapping("/label/{labelId}")
    Result findById(@PathVariable("labelId") String labelId);
}
